package com.pactera.madp.cp.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.pactera.madp.cp.api.entity.WorkEmployeeEntity;
import com.pactera.madp.cp.api.vo.employee.EmployeeInheritVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * @author: zhaojinjian
 * @time: 2020/12/2 5:18 下午
 * @description 员工 mapper
 */
public interface WorkEmployeeMapper extends BaseMapper<WorkEmployeeEntity> {

    List<WorkEmployeeEntity> getWorkEmployeeByUserId(@Param("logUserId") String logUserId);

    WorkEmployeeEntity selectOne(QueryWrapper<WorkEmployeeEntity> wx_user_id);

    /**
     * 查询当前企业全部成员
     *
     * @param page 分页数据
     * @param name 成员名称
     * @param mobile 手机号
     * @param status 成员状态
     * @param corpId 企业id
     * @return
     */
    IPage<EmployeeInheritVO> getListByChoose(Page page,@Param(value = "corpId") Integer corpId,@Param(value = "name") String name,@Param(value = "mobile") String mobile,@Param(value = "status") Integer status);

    Set<Integer> getUsersByWxDeptIds(@Param("wxDeptIds") List<Integer> wxDeptIds);

}
